/*
 * ToolbarPanel.java
 *
 * Created on __DATE__, __TIME__
 */

package edu.chl.tda367.booleancircuits.view.implementation;

import java.awt.*;

import javax.swing.*;

import edu.chl.tda367.booleancircuits.view.IToolbarPanel;

/**
 * A tool bar containing several buttons.
 * 
 * @author Boel
 */
public class ToolbarPanel extends javax.swing.JPanel implements IToolbarPanel {

	private static final long serialVersionUID = 1L;

	// GEN-BEGIN:variables
	// Variables declaration - do not modify
	private JButton copyButton;
	private JButton cutButton;
	private JButton newWorkspaceButton;
	private JButton openFileButton;
	private JButton pasteButton;
	private JButton pauseClockButton;
	private JButton redoButton;
	private JButton saveAllButton;
	private JButton saveAsComponentButton;
	private JButton saveButton;
	private JButton startClockButton;
	private JButton undoButton;

	// End of variables declaration//GEN-END:variables

	/** Creates new form ToolbarPanel */
	public ToolbarPanel() {
		initComponents();
	}

	@Override
	public JButton getCopyButton() {
		return copyButton;
	}

	@Override
	public JButton getCutButton() {
		return cutButton;
	}

	@Override
	public JButton getNewWorkspaceButton() {
		return newWorkspaceButton;
	}

	@Override
	public JButton getOpenFileButton() {
		return openFileButton;
	}

	@Override
	public JButton getPasteButton() {
		return pasteButton;
	}

	@Override
	public JButton getPauseClockButton() {
		return pauseClockButton;
	}

	@Override
	public JButton getRedoButton() {
		return redoButton;
	}

	@Override
	public JButton getSaveAllButton() {
		return saveAllButton;
	}

	@Override
	public JButton getSaveAsComponentButton() {
		return saveAsComponentButton;
	}

	@Override
	public JButton getSaveButton() {
		return saveButton;
	}

	@Override
	public JButton getStartClockButton() {
		return startClockButton;
	}

	@Override
	public JButton getUndoButton() {
		return undoButton;
	}

	@Override
	public void initIcons() {
		newWorkspaceButton.setIcon(new ImageIcon(
				"Resources/Icons/New-Document-icon.png"));
		openFileButton.setIcon(new ImageIcon("Resources/Icons/Open-icon.png"));
		saveButton.setIcon(new ImageIcon("Resources/Icons/Save-icon.png"));
		saveAllButton
				.setIcon(new ImageIcon("Resources/Icons/save-all-icon.png"));
		saveAsComponentButton.setIcon(new ImageIcon(
				"Resources/Icons/save-component.png"));
		startClockButton.setIcon(new ImageIcon(
				"Resources/Icons/clock-play-icon.png"));
		cutButton.setIcon(new ImageIcon("Resources/Icons/cut-icon.png"));
		copyButton.setIcon(new ImageIcon("Resources/Icons/copy-icon.png"));
		pasteButton.setIcon(new ImageIcon("Resources/Icons/paste-icon.png"));
		pauseClockButton.setIcon(new ImageIcon(
				"Resources/Icons/clock-pause-icon.png"));
		undoButton.setIcon(new ImageIcon("Resources/Icons/Undo-icon.png"));
		redoButton.setIcon(new ImageIcon("Resources/Icons/Redo-icon.png"));
	}

	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */
	// GEN-BEGIN:initComponents
	// <editor-fold defaultstate="collapsed" desc="Generated Code">
	private void initComponents() {

		newWorkspaceButton = new JButton();
		openFileButton = new JButton();
		saveButton = new JButton();
		saveAllButton = new JButton();
		saveAsComponentButton = new JButton();
		cutButton = new JButton();
		copyButton = new JButton();
		pasteButton = new JButton();
		undoButton = new JButton();
		redoButton = new JButton();
		startClockButton = new JButton();
		pauseClockButton = new JButton();

		setPreferredSize(new Dimension(260, 24));
		setLayout(new FlowLayout(java.awt.FlowLayout.LEFT));

		newWorkspaceButton.setPreferredSize(new Dimension(20, 20));
		add(newWorkspaceButton);

		openFileButton.setPreferredSize(new Dimension(20, 20));
		add(openFileButton);

		saveAsComponentButton.setPreferredSize(new Dimension(20, 20));
		add(saveAsComponentButton);

		saveButton.setPreferredSize(new Dimension(20, 20));
		add(saveButton);

		saveAllButton.setPreferredSize(new Dimension(20, 20));
		add(saveAllButton);

		add(new JSeparator());

		cutButton.setPreferredSize(new Dimension(20, 20));
		add(cutButton);

		copyButton.setPreferredSize(new Dimension(20, 20));
		add(copyButton);

		pasteButton.setPreferredSize(new Dimension(20, 20));
		add(pasteButton);

		add(new JSeparator());

		undoButton.setPreferredSize(new Dimension(20, 20));
		add(undoButton);

		redoButton.setPreferredSize(new Dimension(20, 20));
		add(redoButton);

		add(new JSeparator());

		startClockButton.setPreferredSize(new Dimension(20, 20));
		add(startClockButton);

		pauseClockButton.setPreferredSize(new Dimension(20, 20));
		add(pauseClockButton);
	}// </editor-fold>
		// GEN-END:initComponents

}